home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 018a / pwlitea.zip / REPORT < prev    next >
Text File  |  1990-01-12  |  28KB  |  593 lines

  1.  
  2. Team Player Design Project 
  3.  
  4. SE 512
  5. Winter 1989
  6. 14 March 1989
  7.  
  8.  
  9. Section 1   INTRODUCTION 
  10.  
  11.  
  12. 1.1  Definition
  13.  
  14. Team Player is an on-line system to support rotisserie baseball leagues formed 
  15. by sports enthusiasts. A rotisserie league is a simulated baseball league in 
  16. which a group of people, participating in a pool, choose teams consisting of 
  17. professional baseball players.  A draft is held yearly and each participant 
  18. sets up their own team (one or more players at each position and several 
  19. pitchers). Team Player allows league creation, league modification, 
  20. statistical tracking, and report generation on an IBM PC or true compatible. 
  21.  
  22.  
  23. 1.3  Scenario
  24.  
  25. After the draft has been held, the administrator sets up the league via on-
  26. line entry screens.  The information captured for the entire league includes 
  27. league name, point distributions (defaults can be used), and the number of 
  28. players allowed at each position.  Next, information on individual teams is 
  29. entered, teams being identified by team name and owner name.  The drafted 
  30. players are assigned to their individual teams and given a playing position. 
  31.  
  32. Once all the teams have been set up, year-to-date (YTD) statistics are 
  33. gathered for all players.  Statistics can be input to Team Player either 
  34. automatically or manually.  For automatic input, the administrator downloads 
  35. the YTD statistics from an on-line service such as CompuServe to a text file 
  36. that is read by Team Player.  If done manually, the software will present 
  37. screens for all players whose statistics are being kept.  The administrator 
  38. will enter values as shown weekly in the newspaper sports section, and the 
  39. software will write these values to a text file read by Team Player. 
  40.  
  41.  
  42.  
  43. Section 2   REQUIREMENTS SPECIFICATION
  44.  
  45.  
  46. 2.1  Product Requirements
  47.  
  48. This section specifies the general requirements for Team Player.  Team Player 
  49. will: 
  50. P-L-+---T1----+-T--2----T----3--T-+----4T---+---T5----+-T--6----T----7--T-+--R
  51.  
  52. * handle all league transactions and provide means for storage of league data 
  53. * provide menu driven, user friendly screens 
  54. * provide on-line forms for manual entry of weekly player statistics 
  55. * allow automatic entry of weekly player statistics downloaded to a text file 
  56.   from a sports information service such as CompuServe 
  57. * allow manual entry and modification of league data 
  58. * provide access and browse of text file for league rules and tutorial 
  59. * assign points for each league structure 
  60. * calculate weekly point totals 
  61. * generate reports 
  62. L---+---T1----+-T--2----T----3--T-+----4T---+---T5----+-T--6----T----7--T-+--R
  63.  
  64.  
  65. 2.2  Context Diagram
  66.  
  67. The Context Diagram for Team Player is shown in Figure 1.  The main 
  68. source/sink is the baseball fan who provides all information necessary to 
  69. configure the league and who receives reports from the system.  Professional 
  70. baseball statistics are input to the system either manually from information 
  71. taken from the newspaper, or automatically downloaded from a sports 
  72. information service such as CompuServe.                                       
  73.  
  74.  
  75. 2.3  Level 0 Data Flow Diagram
  76.  
  77. The Team Player Level 0 DFD identifies the three main processes that make up 
  78. the system.  Each process is reviewed in the following section. 
  79.  
  80.  
  81. 2.4  Process Specifications
  82.  
  83. Process 1.0 - Configure League:
  84.  
  85. This process handles all of the functions associated with setting up and 
  86. modifying league setups.  If a user is setting up a new league this process 
  87. steps the user through all the steps required to input the required 
  88. configuration data.  This data is then stored in the league and team files.  
  89. If the user is modifying an existing league then the program prompts the user 
  90. through selecting what they want modified and inputs the changes to the league 
  91. or team configuration. 
  92.  
  93. PROCESS SPEC:
  94.  
  95.  
  96. Process 2.0 - Update Stats:
  97.  
  98. The purpose of this module is to update the all_players ytd_stats file and 
  99. calculate the weekly statistics.  The weekly statistics are input by the user 
  100. either by prompting the user thru a manual update or by reading in a DOS file 
  101. full of the statistics and automatically doing the update.  After the update 
  102. has been completed the league weekly points are calculated. 
  103.  
  104. PROCESS SPEC 2:
  105.  
  106. 2.1  Get league name and update choice
  107. 2.2  Move this weeks all_players_ytd_stats to previous week
  108. 2.3  If update choice is manual then do
  109.                 Step user thru data entry for each player assigned
  110.                 To a team and store information in
  111.                 All_players_ytd_stats
  112.      Else   
  113.                 Do an automatic update by getting a dos file name
  114.                 From user and read in statistics from the file.
  115.                 Store new statistics in all_players_ytd_stats.
  116. 2.4  Calculate the weekly point totals for each player and
  117.      store in league weekly points
  118.  
  119.  
  120. Process 3.0 - Generate Reports:
  121.  
  122. This procedure allows the user to select a desired item to be reported on and 
  123. outputs the desired information.  The possible reports to be selected are YTD 
  124. league report, weekly league report, YTD team report, weekly team report, 
  125. player ranking, and pro player statistics. 
  126.  
  127. PROCESS SPEC:
  128.  
  129. 3.1  PROMPT USER FOR REPORT SELECTION
  130. 3.2  IF SELECTION IS YTD LEAGUE REPORT THEN
  131.                 GET LEAGUE NAME
  132.                 GET TEAMS ON THE LEAGUE
  133.                 OUTPUT YTD POINTS FOR THE LEAGUE
  134. 3.3  IF SELECTION IS WEEKLY LEAGUE REPORT THEN
  135.                 GET LEAGUE NAME
  136.                 GET TEAMS ON THE LEAGUE
  137.                 OUTPUT WEEKLY TOTALS FOR THE LEAGUE
  138. 3.4  IF SELECTION IS YTD TEAM REPORT THEN
  139.                 GET TEAM NAME
  140.                 OUTPUT YTD TOTAL FOR TEAM
  141. 3.5  IF SELECTION IS WEEKLY TEAM REPORT THEN
  142.                 GET TEAM NAME
  143.                 OUTPUT WEEKLY TOTAL FOR TEAM
  144. 3.6  IF SELECTION IS PLAYER RANKING
  145.                 OUTPUT EACH PLAYERS POINT TOTALS STARTING WITH
  146.                 THE PLAYER WITH THE HIGHEST POINT ALL THE WAY DOWN
  147.                 TO THE PLAYER WITH THE LOWEST POINTS.
  148. 3.7  IF SELECTION IS PRO PLAYER STATISTICS
  149.                 OUTPUT ALL PLAYERS STATISTICS IN YTD PLAYER STATS.
  150.  
  151.  
  152.  
  153. Section 3   DATA DEFINITIONS 
  154.  
  155.  
  156. 3.1  Data Dictionary
  157.  
  158. This section includes the Team Player Data Dictionary in DeMarco notation.
  159.  
  160. LEAGUE_CONFIGURATION = {league_name + league_values + {team_name + owner + 
  161. {player_name + position}}} 
  162.  
  163. PLAYER_LIST = {p-id + player_name + position}
  164.                ────
  165.  
  166. PRO_TEAM_LIST = {pt-id + pro_team_name}
  167.                  ─────
  168.  
  169. TEAM_FILE = {t-id + team_name + owner + league_name}  *t-id is unique 
  170.              ────
  171.  
  172. TEAM_PLAYER_FILE = {t-id + p-id}
  173.                     ────   ────
  174.  
  175. ALL_PLAYERS_YTD_STATS = {p-id + position +  pt-id + player_stats}
  176.                          ────             
  177.   alias: professional_statistics    
  178.  
  179. PLAYER_STATS = {sp_stats | rp_stats | bt_stats}
  180.  
  181.   SP_STATS = {wins + losses + earned_runs + innings + complete_games + 
  182.     strike_outs + walks} * starting pitcher *
  183.  
  184.   RP_STATS = {wins + losses + earned_runs + innings + saves + strike_outs + 
  185.     walks}  * relief pitcher *
  186.  
  187.   BT_STATS = {singles + doubles + triples + home_runs + runs_scored 
  188.     *batter *  + runs_batted_in + stolen_bases} 
  189.  
  190.   POSITION = | relief_pitcher  = 0 |
  191.              | starting_pitcher= 1 |
  192.              | first_base      = 2 |
  193.              | second_base     = 3 |
  194.              | third_base      = 4 |
  195.              | catcher         = 5 |
  196.              | short_stop      = 6 |
  197.              | left_field      = 7 |
  198.              | right_field     = 8 |
  199.              | center_field    = 9 |
  200.  
  201. LEAGUE_ATTRIBUTES = {league_name + league_values}
  202.                      ───────────
  203.  
  204.  LEAGUE_VALUES= point_values_rules + no_pitchers + no_relievers + no_batters
  205.  
  206.  
  207.   POINT_VALUES_RULES = rules_for_starting_pitchers + rules_for_relief_pitchers 
  208.   + rules_for_batters  * point values rules for each league *
  209.  
  210.   RULES_FOR_STARTING_PITCHERS = points-for-win-p + points_for_losses-p +
  211.                  points_for_earned_runs_p + points_for_innings_p +
  212.                  points_for_complete_games_p + points_for_strikeouts_p +
  213.                  points_for_walks_p
  214.  
  215.   RULES_FOR_RELIEF_PITCHERS = points-for-win-r + points_for_losses-r +
  216.                  points_for_earned_runs_r + points_for_innings_r +
  217.                  points_for_saves + points_for_strikeouts_r +
  218.                  points_for_walks_r
  219.  
  220.   RULES_FOR_BATTERS = points_for_singles + points_for_doubles +
  221.   *all other*    points_for_triples + points_for_home_runs +
  222.   *positions*    points_for_runs_scored + points_for_runs_batted_in +
  223.                  points_for_stolen_bases
  224.  
  225. LEAGUE_WEEKLY_POINTS= {t-id + p-id + week + point_totals}
  226.                        ────   ────   ────
  227.  * details of points for each player for each week *
  228.  
  229.  POINT_TOTALS = {sp_totals | rp_totals | bt_totals}
  230.  
  231.    SP_TOTALS = {wins_points_p + losses_points_p + earned_runs_points-p + 
  232.      *starting  innings_points_p + complete_games_points + 
  233.      strike_outs_points_p + pitcher*  walks_points_p}      
  234.  
  235.    RP_TOTALS = {wins_points_r + losses_points_r + earned_runs_points-r + 
  236.      *relief    innings_points_r + saves_points + strike_outs_points_r +
  237.       pitcher*  walks_points_r}
  238.  
  239.    BT_TOTALS = {singles_points + doubles_points + triples_points + 
  240.      *batter*   home_runs_points + runs_scored_points + runs_batted_in_points + 
  241.                 stolen_bases_points}
  242.  
  243.  
  244.  
  245. 3.3  Data Item Definitions 
  246.  
  247. Data Items are defined as follows:
  248.  
  249. ANY_BINARY = [1|2|3|4|.....|256]
  250.  
  251. ANY_CHARACTER = [A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z| |]
  252.  
  253. ANY_DIGIT = [1|2|3|4|5|6|7|8|9|0]
  254.  
  255. COMPLETE_GAMES = 1{any_digit}2
  256.  
  257. COMPLETE_GAMES_POINTS = any_binary
  258.  
  259. DOUBLES = 1{any_digit}2
  260.  
  261. DOUBLES_POINTS = any_binary
  262.  
  263. EARNED_RUNS = 1{any_digit}2
  264.  
  265. EARNED_RUNS_POINTS_P = any_binary
  266.  
  267. EARNED_RUNS_POINTS_R = any_binary
  268.  
  269. HOME_RUNS = 1{any_digit}2
  270.  
  271. HOME_RUNS_POINTS = any_binary
  272.  
  273. INNINGS = 1{any_digit}2
  274.  
  275. INNINGS_POINTS_P = any_binary
  276.  
  277. INNINGS_POINTS_R = any_binary
  278.  
  279. LEAGUE_NAME = 1{any_character | any_digit}15
  280.  
  281. LOSSES = 1{any_digit}2
  282.  
  283. LOSSES_POINTS_P = any_binary
  284.  
  285. LOSSES_POINTS_R = any_binary
  286.  
  287. NO_BATTERS = any_binary
  288.  
  289. NO_PITCHERS = any_binary
  290.  
  291. NO_RELIEVERS = any_binary
  292.  
  293. OWNER  = 1{any_character}25
  294.  
  295. P-ID = 1{any_binary}2
  296.  
  297. PLAYER_NAME = 1{any_character}25
  298.  
  299. POINTS_FOR_COMPLETE_GAMES_P = any_binary
  300.  
  301. POINTS_FOR_DOUBLES = any_binary
  302.  
  303. POINTS_FOR_EARNED_RUNS_P = any_binary
  304.  
  305. POINTS_FOR_EARNED_RUNS_R = any_binary
  306.  
  307. POINTS_FOR_HOME_RUNS = any_binary
  308.  
  309. POINTS_FOR_INNINGS_P = any_binary
  310.  
  311. POINTS_FOR_INNINGS_R = any_binary            WALKS = 1{any_digit}2      
  312.                                                                         
  313. POINTS_FOR_LOSSES_P = any_binary             WALKS_POINTS_P = any_binary
  314.                                                                         
  315. POINTS_FOR_LOSSES_R = any_binary             WALKS_POINTS_R = any_binary
  316.                                                                         
  317. POINTS_FOR_RUNS_BATTED_IN = any_binary       WEEK = any_binary          
  318.                                                                         
  319. POINTS_FOR_RUNS_SCORED = any_binary          WINS = 1{any_digit}2       
  320.                                                                         
  321. POINTS_FOR_SAVES = any_binary                WINS_POINTS_P = any_binary 
  322.                                                                         
  323. POINTS_FOR_SINGLES = any_binary              WINS_POINTS_R = any_binary 
  324.  
  325. POINTS_FOR_STRIKEOUTS_P = any_binary
  326.  
  327. POINTS_FOR_STRIKEOUTS_R = any_binary
  328.  
  329. POINTS_FOR_TRIPLES = any_binary
  330.  
  331. POINTS_FOR_WALKS_P = any_binary
  332.  
  333. POINTS_FOR_WALKS_R = any_binary
  334.  
  335. POINTS_FOR_WIN_P = any_binary
  336.  
  337. POINTS_FOR_WIN_R = any_binary
  338.  
  339. PRO_TEAM_NAME = 1{any_character}25
  340.  
  341. PT-ID = any_binary
  342.  
  343. RUNS_BATTED_IN = 1{any_digit}2
  344.  
  345. RUNS_BATTED_IN_POINTS = any_binary
  346.  
  347. RUNS_SCORED = 1{any_digit}2
  348.  
  349. RUNS_SCORED_POINTS = any_binary
  350.  
  351. SAVES = 1{any_digit}2
  352.  
  353. SAVES_POINTS = any_binary
  354.  
  355. SINGLES = 1{any_digit}2
  356.  
  357. SINGLES_POINTS = any_binary
  358.  
  359. STOLEN_BASES = 1{any_digit}2
  360.  
  361. STOLEN_BASES_POINTS = any_binary
  362.  
  363. STRIKE_OUTS = 1{any_digit}2
  364.  
  365. STRIKE_OUTS_POINTS_P = any_binary
  366.  
  367. STRIKE_OUTS_POINTS_R = any_binary
  368.  
  369. T-ID = any_binary
  370.  
  371. TEAM_NAME = 1{any_character | any_digit}15
  372.  
  373. TRIPLES = 1{any_digit}2
  374.  
  375. TRIPLES_POINTS = any_binary
  376.  
  377.  
  378. 3.4  Overview of Data Stores
  379.  
  380. The data stores for Team Player are shown here.  
  381.  
  382.  
  383. L---+---T1-    -T--2----T----3--T-+----4T---+---T5----+-T--6-                                           R
  384.   PLAYER_LIST   ┌──────╥────────────────────┬──────────┐
  385.                 │ p_id ║ player_name        │ position │
  386.                 ├──────╫────────────────────┼──────────┤
  387.                 │  1   ║ Alvin Davis        │    3     │
  388.                 │  2   ║ George Brett       │    5     │
  389.                 │  3   ║ Mickey Mantle      │    8     │
  390.                 │  4   ║ Willie Mays        │    8     │
  391.                 └──────╨────────────────────┴──────────┘
  392.  
  393.  
  394.               ┌─────╥────────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ 
  395.               │p_id ║position│pt_id│stat1│stat2│stat3│stat4│stat5│stat6│stat7│ 
  396.               ├─────╫────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ 
  397.               │ 273 ║   2    │   8 │  98 │  40 │  2  │  15 │  82 │  67 │   1 │ 
  398.               │  49 ║   4    │   7 │  31 │  28 │  8  │  34 │ 144 │ 101 │   0 │ 
  399.               │ 651 ║   5    │  13 │ 150 │  47 │  2  │   8 │  71 │ 107 │   0 │ 
  400.               │  35 ║   1    │  13 │  24 │   4 │ 90  │ 250 │  12 │ 205 │ 100 │ 
  401.               │  22 ║   0    │  24 │   5 │   5 │ 50  │  80 │  12 │  40 │  25 │ 
  402.               └─────╨────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ 
  403.                                                                                
  404.  
  405.               ┌────┬──────┬────╥────┬─────┬─────┬─────┬─────┬─────┬─────┐      
  406.               │t_id│ p_id │week║pt1 │ pt2 │ pt3 │ pt4 │ pt5 │ pt6 │ pt7 │      
  407.               ├────┼──────┼────╫────┼─────┼─────┼─────┼─────┼─────┼─────┤      
  408.               │  1 │  273 │ 1  ║ 10 │   2 │   6 │   8 │   3 │   3 │   0 │      
  409.               │  1 │  651 │ 1  ║  6 │   2 │   0 │   0 │   5 │   4 │   2 │      
  410.               │  2 │   35 │ 1  ║ 26 │ -10 │  -6 │   8 │   0 │   7 │   3 │      
  411.               │  1 │  273 │ 2  ║  3 │   2 │   0 │   0 │   4 │   2 │   1 │      
  412.               │  1 │  651 │ 2  ║  8 │   0 │   3 │   4 │   3 │   3 │   1 │      
  413.               │  2 │   35 │ 2  ║  0 │   0 │   0 │   0 │   0 │   0 │   0 │      
  414.               │  1 │  273 │ 3  ║  6 │   0 │   0 │   8 │   3 │   3 │   1 │      
  415.               │  1 │  651 │ 3  ║  5 │   6 │   3 │   0 │   2 │   1 │   0 │      
  416.               │  2 │   35 │ 3  ║  0 │ -10 │  -5 │   4 │   0 │   4 │  -6 │      
  417.               └────┴──────┴────╨────┴─────┴─────┴─────┴─────┴─────┴─────┘
  418.                                                                                
  419.   PRO_TEAM_LIST     ┌─────────╥────────────────────────────┐          
  420.                     │  pt_id  ║  pro_team_name             │          
  421.                     ├─────────╫────────────────────────────┤          
  422.                     │    0    ║  Boston Red Sox            │          
  423.                     │    1    ║  New York Yankees          │          
  424.                     │    2    ║  Detroit Tigers            │          
  425.                     │    3    ║  Cleveland Indians         │          
  426.                     │    4    ║  Milwaukee Brewers         │          
  427.                     │    5    ║  Baltimore Orioles         │          
  428.                     │    6    ║  Toronto Blue Jays         │          
  429.                     │    7    ║  Seattle Mariners          │          
  430.                     │    8    ║  Chicago White Sox         │          
  431.                     │    9    ║  Kansas City Royals        │          
  432.                     │   10    ║  California Angels         │          
  433.                     │   11    ║  Texas Rangers             │          
  434.                     │   12    ║  Oakland Athletics         │          
  435.                     │   13    ║  Minnesota Twins           │          
  436.                     │   14    ║  New York Mets             │          
  437.                     │   15    ║  Philadelphia Phillies     │          
  438.                     │   16    ║  St. Louis Cardinals       │          
  439.                     │   17    ║  Chicago Cubs              │          
  440.                     │   18    ║  Pittsburgh Pirates        │          
  441.                     │   19    ║  Montreal Expos            │          
  442.                     │   20    ║  Los Angeles Dodgers       │          
  443.                     │   21    ║  Houston Astros            │          
  444.                     │   22    ║  Cincinnatti Reds          │          
  445.                     │   23    ║  San Diego Padres          │          
  446.                     │   24    ║  San Francisco Giants      │          
  447.                     │   25    ║  Atlanta Braves            │          
  448.                     └─────────╨────────────────────────────┘          
  449.  
  450.  
  451.  
  452.  
  453.  
  454.   TEAM_FILE                                                                  
  455.             ┌───────╥────────────────┬────────────────────┬─────────────────┐
  456.             │ t_id  ║ team_name      │ owner              │ league_name     │
  457.             ├───────╫────────────────┼────────────────────┼─────────────────┤
  458.             │   0   ║ Grizzlies      │ Deb Bear           │ Engineers       │
  459.             │   1   ║ Bat Busters    │ Chris Halasz       │ Crashers        │
  460.             │   2   ║ Super Cynics   │ Lance Lovick       │ Engineers       │
  461.             │   3   ║ No Sox         │ Pamela Perrott     │ Engineers       │
  462.             │   4   ║ Big Boppers    │ Scott Love         │ Crashers        │
  463.             └───────╨────────────────┴────────────────────┴─────────────────┘
  464.  
  465.  
  466.  
  467.  
  468.   TEAM_PLAYER_FILE     ┌────────┬──────────╖
  469.                        │ t_id   │   p_id   ║
  470.                        ├────────┼──────────╢
  471.                        │   1    │     50   ║
  472.                        │   1    │    265   ║
  473.                        │   1    │     37   ║
  474.                        │   1    │     28   ║
  475.                        │   1    │    255   ║
  476.                        │   1    │     76   ║
  477.                        │   2    │     81   ║
  478.                        │   2    │      3   ║
  479.                        │   2    │     98   ║
  480.                        └────────┴──────────╜
  481.                   
  482.  
  483.  
  484. 3.5  Database Size Comparisons
  485. L---+---T1----+-T--2----T----3--T-+----4T---+---T5----+-T--6----T----7--T-+--R
  486.  
  487. When initial system design was completed, the database sizes were as shown in 
  488. "before" below.  The files were larger than we wanted, so we came up with 
  489. changes to decrease storage space.  It was decided that 15 bytes was adequate 
  490. to store both team and league names, and that a number of other fields could 
  491. be reduced as well.  Additionally, we included a player list, team list and 
  492. pro_team list each with single bit ID's that would be stored in other files.  
  493. Net_totals were dropped from league_weekly_points since they can be 
  494. calculated.  After all changes were made, the sizes were as shown in the 
  495. "after" column. 
  496.  
  497. L---+---T1----+-T--2----T----3--T-+----4T---+---T5----+-T--6-                                                 R
  498. .s:8
  499. .x:17
  500. ╔═════════════════════════════════════════════╤══════════╤════════╤═══════════╤════════════╤═══════════╗
  501. ║                                             │  RECORD  │ RECORD │   NUMBER  │    TOTAL   │   TOTAL   ║
  502. ║                                             │   SIZE   │  SIZE  │     OF    │    BYTES   │   BYTES   ║
  503. ║                                             │  BEFORE  │ AFTER  │  RECORDS  │   BEFORE   │   AFTER   ║
  504. ╠═════════════════════════════════════════════╪══════════╪════════╪═══════════╪════════════╪═══════════╣
  505. ║ ALL_PLAYERS_YTD_STATS = { player_name +     │    25    │        │           │            │           ║
  506. ║                           p_id +            │          │   2    │           │            │           ║
  507. ║ * 2 files like this *     position +        │     1    │   1    │    625    │            │           ║
  508. ║ * are kept, one for *     pro_team_name +   │    25    │        │  (times   │            │           ║
  509. ║ * this week and one *     pt_id +           │          │   1    │     2     │            │           ║
  510. ║ * for last week     *     stats }           │   2*7    │ 2*7    │   files)  │            │           ║
  511. ║                                             │          │        │           │            │           ║
  512. ║                           TOTAL             │    65    │  18    │           │    81,250  │   22,500  ║
  513. ╠═════════════════════════════════════════════╪══════════╪════════╪═══════════╪════════════╪═══════════╣
  514. ║ TEAM_FILE = { team_name +                   │    25    │  15    │           │            │           ║
  515. ║               t_id +                        │          │   1    │    20     │            │           ║
  516. ║ * t_id is *   owner +                       │    25    │  25    │   times   │            │           ║
  517. ║ * unique  *   league_name }                 │    25    │  15    │ number of │            │           ║
  518. ║                                             │          │        │  leagues  │            │           ║
  519. ║               TOTAL                         │    75    │  56    │           │    15,000  │   11,200  ║
  520. ╠═════════════════════════════════════════════╪══════════╪════════╪═══════════╪════════════╪═══════════╣
  521. ║                                             │          │        │           │            │           ║
  522. ║ TEAM_PLAYER_FILE = { team_name +            │    25    │        │    460    │            │           ║
  523. ║                      t_id +                 │          │   1    │   times   │            │           ║
  524. ║                      player_name +          │    25    │        │ number of │            │           ║
  525. ║                      p_id }                 │          │   2    │  leagues  │            │           ║
  526. ║                                             │          │        │           │            │           ║
  527. ║                      TOTAL                  │    50    │   3    │           │   230,000  │   13,800  ║
  528. ╠═════════════════════════════════════════════╪══════════╪════════╪═══════════╪════════════╪═══════════╣
  529. ║                                             │          │        │           │            │           ║
  530. ║ LEAGUE_FILE = { league_name +               │    25    │  15    │     1     │            │           ║
  531. ║                 league_values }             │  24*2    │24*1    │    per    │            │           ║
  532. ║                                             │          │        │  league   │            │           ║
  533. ║                 TOTAL                       │    73    │  39    │           │       730  │      390  ║
  534. ╠═════════════════════════════════════════════╪══════════╪════════╪═══════════╪════════════╪═══════════╣
  535. ║                                             │          │        │           │            │           ║
  536. ║ LEAGUE_WEEKLY_POINTS = { team_name +        │    25    │        │           │            │           ║
  537. ║                          t_id +             │          │   1    │           │            │           ║
  538. ║                          player_name +      │    25    │        │     26    │            │           ║
  539. ║                          p_id +             │          │   2    │   weeks   │            │           ║
  540. ║                          week +             │     2    │   1    │   times   │            │           ║
  541. ║                          point_totals +     │   7*2    │ 7*1    │    460    │            │           ║
  542. ║                          net_totals }       │     3    │        │  players  │            │           ║
  543. ║                                             │          │        │           │            │           ║
  544. ║                          TOTAL              │    69    │  11    │           │ 8,250,000  │ 1,315,600 ║
  545. ╚═════════════════════════════════════════════╧══════════╧════════╧═══════════╧════════════╧═══════════╝
  546. ╔═════════════════════════════════════════════╤══════════╤════════╤═══════════╤════════════╤═══════════╗
  547. ║                                             │  RECORD  │ RECORD │   NUMBER  │    TOTAL   │   TOTAL   ║
  548. ║                                             │   SIZE   │  SIZE  │     OF    │    BYTES   │   BYTES   ║
  549. ║                                             │  BEFORE  │ AFTER  │  RECORDS  │   BEFORE   │   AFTER   ║
  550. ╠═════════════════════════════════════════════╪══════════╪════════╪═══════════╪════════════╪═══════════╣
  551. ║                                             │          │        │           │            │           ║
  552. ║ PLAYER_LIST = { p_id +                      │          │   2    │           │            │           ║
  553. ║                 player_name +               │          │  25    │    625    │            │           ║
  554. ║                 position }                  │          │   1    │           │            │           ║
  555. ║                                             │          │        │           │            │           ║
  556. ║                 TOTAL                       │          │  28    │           │            │    17,500 ║
  557. ╠═════════════════════════════════════════════╪══════════╪════════╪═══════════╪════════════╪═══════════╣
  558. ║                                             │          │        │           │            │           ║
  559. ║ PRO_TEAM_LIST = {pt_id +                    │          │   1    │           │            │           ║
  560. ║                  pro_team_name }            │          │  25    │     26    │            │           ║
  561. ║                                             │          │        │           │            │           ║
  562. ║                  TOTAL                      │          │  26    │           │            │       676 ║
  563. ╠═════════════════════════════════════════════╪══════════╪════════╪═══════════╪════════════╪═══════════╣
  564. ║                                             │          │        │           │            │           ║
  565. ║ ***    GRAND TOTAL    ***                   │          │        │           │            │           ║
  566. ║                                             │          │        │           │ 8,576,980  │ 1,381,666 ║
  567. ╚═════════════════════════════════════════════╧══════════╧════════╧═══════════╧════════════╧═══════════╝
  568. .s:6
  569. L---+---T1----+-T--2----T----3--T-+----4T---+---T5----+-T--6-R
  570. .x:10
  571.  
  572. It seemed clear at this point that the league_weekly_points 
  573. file would have to be on disk.  So would the 
  574. all_players_YTD_stats file.  These are accessed mainly at 
  575. report time and can be read and reported on at the time 
  576. statistics are downloaded or when reports are generated. 
  577.  
  578. We then decided to use a linked list to link the league to its 
  579. teams, and the teams in a league to its players.  Since 
  580. several of the files above are merely for linking these 
  581. together, we thought this scheme might be useful. 
  582.  
  583. We would keep the player_list file.  This is a list of all pro 
  584. players, whether they are on a team in a league or not.  This 
  585. would be implemented as an array of 1000 cells.  There are 
  586. about 625 professional players (26 teams of 24 players), but 
  587. with some leaving the pros and others replacing them during 
  588. the season, we wanted to allow for more total players in a 
  589. year.  Initially, we would sort the players alphabetically as 
  590. we did the first statistics download and assign them p-id's.  
  591. As others needed to be added, they would be added at the end. 
  592.  
  593.